from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from info import create_app, db, models

# 将工厂函数的返回值APP复制给app
app = create_app('development')
# 添加管理时间 将APP和manage联系git
# 添加扩展命令行
manage = Manager(app)
# 增加数据迁移框架
# 关联APP和数据库db
Migrate(app, db)
# 给管理manage添加迁移命令
manage.add_command('db', MigrateCommand)

if __name__ == '__main__':

    manage.run()
